<?php Tag::css('scaffold') ?>
<div id="scaffold">
    <?php View::content(); ?>
    <h1>Banners : <span>index</span></h1>
    <?php if ($banners->items) : ?>
        <table>
            <thead><tr>                    
                    <th>Imagen</th>                    
                    <th>Archivo</th>
                    <th>Descripción</th>
                    <th>Activo</th>
                    <th>Acciones</th>
                </tr></thead>
            <tbody>
            <?php foreach ($banners->items as $item) : ?>
                <tr>                                        
                    <td><?php echo Html::img($item->ruta,"height=\"200\" width=\"200\"")  ?></td>
                    <td><?php echo $item->titulo ?></td>
                    <td><?php echo $item->descripcion ?></td>
                    <td><?php if($item->estatus == 1) echo "Si"; else echo "No"; ?></td>
                    <td><?php echo Html::linkAction("ver/$item->id/", 'Ver') ?> |
                    <?php echo Html::linkAction("editar/$item->id/", 'Editar') ?> |
                    <?php echo Html::linkAction("borrar/$item->id/", 'Borrar') ?> |
                </td>
            </tr>
            <?php endforeach ?>
                </tbody>
            </table>
    <?php View::partial('paginators/extended', false, array('page' => $banners, 'url' => Router::get('controller_path') . '/index')); ?>

    <?php else : // Si no hay items?>
                        <h2>No hay ningún registro</h2>
    <?php endif ?>
    <div class="actions">
        <?php echo Html::linkAction("crear/", 'Crear registro') ?>
    </div>
</div>
